/**
 * 
 *
 * 
 * 
 */
package com.east196.xfast.ext.beetl.format;

import com.east196.xfast.common.utils.web.HtmlUtil;
import org.beetl.core.Format;

public class XSSFormat implements Format {

	@Override
	public Object format(Object data, String pattern) {
		if (null == data) {
			return null;
		} else {
			String content = (String) data;
			// XSS简单过滤
			content = HtmlUtil.XSSEncode(content);
			return content;
		}
	}
}
